From 395b1e96a022cd367798be5971cd78f099e33f76 Mon Sep 17 00:00:00 2001 From: "emellor@ewan" Date: Fri, 23 Sep 2005 17:17:22 +0100 Subject: [PATCH] Removed unused Blkctl.py. The functionality here has been taken over by the new hotplug system. Signed-off-by: Ewan Mellor --- tools/python/xen/xend/Blkctl.py | 43 --------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 tools/python/xen/xend/Blkctl.py diff --git a/tools/python/xen/xend/Blkctl.py b/tools/python/xen/xend/Blkctl.py deleted file mode 100644 index a161f4d42b..0000000000 --- a/tools/python/xen/xend/Blkctl.py +++ /dev/null @@ -1,43 +0,0 @@ -"""Xend interface to block control scripts. -""" -import os -import os.path -import sys -import string -import xen.util.process - -from xen.xend import XendRoot - -xroot = XendRoot.instance() - -"""Where network control scripts live.""" -SCRIPT_DIR = xroot.block_script_dir - -def block(op, type, dets, script=None): - """Call a block control script. - Xend calls this with op 'bind' when it is about to export a block device - (other than a raw partition). The script is called with unbind when a - device is no longer in use and should be removed. - - @param op: operation (start, stop, status) - @param type: type of block device (determines the script used) - @param dets: arguments to the control script - @param script: block script name - """ - - if op not in ['bind', 'unbind']: - raise ValueError('Invalid operation:' + op) - - # Special case phy devices - they don't require any (un)binding - # Parallax also doesn't need script-based binding. - if (type == 'phy') or (type == 'parallax'): - return dets - - if script is None: - script = xroot.get_block_script(type) - script = os.path.join(SCRIPT_DIR, script) - args = [op] + string.split(dets, ':') - args = ' '.join(args) - ret = xen.util.process.runscript(script + ' ' + args) - if len(ret): - return ret.splitlines()[0] -- 2.30.2